Image editing applications provide users with tools to create, edit, and manipulate digital graphical images. Editing of digital graphical images has widespread acceptance and is used in multiple roles, including in professional, hobbyist, and amateur contexts. Additionally or alternatively, image editing applications include various editing tools by which a user creates or manipulates a digital graphical image, such as tools for erasing, applying brushstrokes to, modifying colors of, or applying effects to some or all portions of the image. Editing tools affect, for example, portions of an image that are indicated by a user via a cursor, such as by indicating an area with a mouse or with a fingertip on a touchscreen.
In some cases, conventional editing tools edit portions of an image that are indicated by the cursor, such as portions of an image that are overlapped by the cursor. Additionally or alternatively, conventional editing tools edit active portions of an image that are indicated by the cursor, such as portions that are overlapped by the cursor on an active layer of the image. The portion of the image that is affected by the cursor may include all active layers overlapping with the cursor. In some cases, a user applies an editing tool to a targeted brushstroke in an image by moving the cursor in a certain direction, such as a direction similar to the direction of the targeted brushstroke. The cursor may edit the brushstroke having the similar direction. However, the cursor may edit additional portions of the image, such as additional brushstrokes having directions dissimilar to the direction of the cursor. Modifying the cursor (e.g., to have a smaller shape) allows a user to edit a brushstroke with increased precision, but using the modified cursor results in increased time for the user to perform the edits. In addition, an input device associated with the modified cursor, such as a fingertip on a touchscreen, may be imprecise, resulting in mistakes and increasing frustration of the user.
Existing image editing applications include, in some cases, the use of image layers to activate (or deactivate) certain portions of an image that are on active (or inactive) layers. For example, a user applies an editing tool to an active layer that includes a targeted brushstroke to be edited. The editing tool applied to the active layer edits only portions of the image located on the active layer. However, multiple additional brushstrokes located on the active layer are still modified by the editing tool, and brushstrokes other than targeted brushstroke are edited on the active layer. A user may attempt to select a particular brushstroke and move it to a new layer. However, selection techniques may be imprecise when other brushstrokes overlap with the particular brushstroke, and the selection technique may select brushstrokes (or other image portions) other than the particular brushstroke.
Thus, it is desirable to develop techniques by which an editing tool selectively edits a brushstroke having a direction similar to the direction of the editing tool. In addition, it is desirable to develop data structures representing direction information associated with a brushstroke.